package com.fh.service.impl;


import com.alibaba.nacos.shaded.org.checkerframework.checker.units.qual.A;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fh.service.ImagesService;
import com.fh.mapper.ImagesMapper;
import com.utils.bean.Images;
import com.utils.bean.ImagesOrUser;
import com.utils.bean.ImagesUpdate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author Administrator
* @description 针对表【images】的数据库操作Service实现
* @createDate 2023-05-31 08:39:54
*/
@Service
public class ImagesServiceImpl extends ServiceImpl<ImagesMapper, Images>
implements ImagesService{

    @Autowired
    private ImagesMapper imagesMapper;

    /**
     * @description: 对图片进行添加
     * @author whf
     * @date 2023/5/31 8:46
     * @param images
     */
    @Override
    public void add(Images images){
        this.save(images);
    }

    /**
     * @param imagesOrUser
     * @return java.util.List<com.utils.bean.Images>
     * @description: 查询图片
     * @author whf
     * @date 2023/6/1 14:58
     */
    @Override
    public List<Images> getImages(ImagesOrUser imagesOrUser) {
        return imagesMapper.getImages(imagesOrUser);
    }

    /**
     * @param imagesUpdate
     * @description: 对图片进行删除
     * @author whf
     * @date 2023/6/1 17:20
     */
    @Override
    public void updateImages(ImagesUpdate imagesUpdate) {
        imagesMapper.updateImages(imagesUpdate);
    }
}
